import java.util.Scanner;

public class Ex3_3{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		System.out.print("Enter a, b, c, d, e, f: ");
		double a = input.nextDouble();
		double b = input.nextDouble();
		double c = input.nextDouble();
		double d = input.nextDouble();
		double e = input.nextDouble();
		double f = input.nextDouble();
		double m = a * d - b * c;
		if (m == 0){
			System.out.println("The equation has no solution.");
			System.exit(0);
		}
		else{
			double x = (e * d - b * f) / m;
			double y = (a * f - e * c) / m;
			System.out.printf("x is %.1f and y is %.1f\n", x, y);
		}
	}
}